Setup:

Not much—only to keep track of the rows and columns. These are not accesible to the user—should they?

( @count@ @count@

@@ =@ @@ =@ @@ =@ )

There are some user-defined parameters summarised later.

The following is an experimental set of `optimal' queueing macros using two queues and two counters to keep track of the progress.

( @toks@ @toks@@

@count@ @count@@

@@@=@=ne @@=@@=@

@@#1@ne @@<@ @@=@i @@=@ii @@@@@@#1

@@@=

@@i#1@@#2@@ne @@=#1#2

@@ii#1@@#2@ne @@=@ @=@#1#2@@=

@@@ii@@@@ )

: intended to make the addition of tokens to the token list faster: we first add to the `small' |@@| as many times as we have added to the `big' |@| before that. So we know we should always expand |@@|: this is done first (last in the macro text). Then we call |@@| that will either add to the small one or add the small one to the big one and then clear the small one!

"Usage": Call |@| first. Then use |@| as many times as desired. To get the queue in |@| call |@| and use it. Finally clear |@| (globally) or continue.